From 994b549ef1c0fd1307cb84cd3f8fd9943bf3ab5b Mon Sep 17 00:00:00 2001 From: "cl349@firebug.cl.cam.ac.uk" Date: Tue, 17 May 2005 14:45:00 +0000 Subject: [PATCH] bitkeeper revision 1.1429.2.2 (428a036cO1cnBZO53U3HCW-Lk42RtA) network: Handle xend restart -- don't take down the network setup and don't initialize it if it looks already initialized. Signed-off-by: Christian Limpach --- tools/examples/network | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/examples/network b/tools/examples/network index 47daae95b0..4bec37f5be 100755 --- a/tools/examples/network +++ b/tools/examples/network @@ -164,6 +164,10 @@ op_start () { create_bridge ${bridge} + if ifconfig 2>/dev/null | grep -q veth0 ; then + return + fi + if ifconfig veth0 2>/dev/null | grep -q veth0 ; then # Propagate MAC address and ARP responsibilities to virtual interface. mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'` @@ -197,6 +201,8 @@ op_stop () { return fi + return + brctl delif ${bridge} ${netdev} if ifconfig veth0 2>/dev/null | grep -q veth0 ; then -- 2.30.2